Skip to content

Fix library class version error #1118

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 11, 2025
Merged

Conversation

ThexXTURBOXx
Copy link
Contributor

I depended on a library compiled for Java 21 and stumbled upon this error.
I was quite puzzled by the error message - however after some testing I was able to confirm that Java 17 libraries work fine whilst Java 18 libraries (and later) do not.
This PR fixes the confusing error message.

Copy link

@tychedelia tychedelia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might want to see if you can use something like https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Runtime.Version.html in order to avoid the need to keep this info string up to date.

@ThexXTURBOXx
Copy link
Contributor Author

Done - that's actually a pretty good idea. At first, I thought about System.getProperty("java.version"), but Runtime#version is way cleaner, I think.

@Stefterv Stefterv added this to the 4.4.5 milestone Jun 20, 2025
@SableRaf SableRaf merged commit c2b7251 into processing:main Jul 11, 2025
12 checks passed
@SableRaf
Copy link
Collaborator

Thanks @ThexXTURBOXx and @tychedelia 💙

@SableRaf
Copy link
Collaborator

@all-contributors please add @ThexXTURBOXx for code

Copy link
Contributor

@SableRaf

I've put up a pull request to add @ThexXTURBOXx! 🎉

@SableRaf
Copy link
Collaborator

@all-contributors please add @tychedelia for review

Copy link
Contributor

@SableRaf

I've put up a pull request to add @tychedelia! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants